package com.sc.nft.service.impl;

import cn.hutool.core.util.IdUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.sc.nft.dao.PropEquityVestInDao;
import com.sc.nft.entity.PropEquityVestIn;
import com.sc.nft.entity.dto.AdminPropEquityVistInSaveDTO;
import com.sc.nft.entity.dto.PageAdminEquityPropsVistInDTO;
import com.sc.nft.entity.vo.PageAdminEquityPropsVistInVO;
import com.sc.nft.service.PropEquityVestInService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
* @author PC
* @description 针对表【sc_prop_equity_vest_in】的数据库操作Service实现
* @createDate 2024-10-14 18:01:20
*/
@Slf4j
@RequiredArgsConstructor
@Service
public class PropEquityVestInServiceImpl implements PropEquityVestInService{
    private final PropEquityVestInDao propEquityVestInDao;

    @Override
    public IPage<PageAdminEquityPropsVistInVO> getPageAdminEquityPropsVistIn(PageAdminEquityPropsVistInDTO request) {
        return propEquityVestInDao.getPageAdminEquityPropsVistIn(request);
    }

    @Override
    public void save(AdminPropEquityVistInSaveDTO adminPropEquityVistInSaveDTO) {
        PropEquityVestIn propEquityVestIn=new PropEquityVestIn();
        // 生成随机的32位字符串
        propEquityVestIn.setFlag(IdUtil.fastSimpleUUID());
        propEquityVestIn.setName(adminPropEquityVistInSaveDTO.getName());
        propEquityVestInDao.save(propEquityVestIn);
    }
}




